package com.javaenzk.wfx.manager.configs;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RestTemConfig {

    /**
     * 不管是否使用负载均衡，都需要加上这个注解
     * @return
     */
    @LoadBalanced
    @Bean
    public RestTemplate provideRestTemplate(){
        return new RestTemplate();
    }

}
